package com.danco.training.zaneuskaya.api;




import java.util.Date;
import java.util.List;

import com.danco.training.zaneuskaya.domain.Book;
import com.danco.training.zaneuskaya.domain.Order;

public interface OrderService extends EntityService<Order> {

        public List<Order> getExecutedOrders();

        public List<Order> getNotExecutedOrders();

        public List<Order> getExecutedOrdersForPeriod(Date from, Date to);

        public List<Order> getOrdersSortedByOrderDate();

        public List<Order> getOrdersSortedByTotalPrice();

        public List<Order> getOrdersSortedByOrderState();

        public List<Order> getExecutedOrdersSortedByOrderDate(
                        Date from, Date to);

        public List<Order> getExecutedOrdersSortedByPrice(Date from,
                        Date to);

        public boolean addBookToOrder(Order order, Book book);

        public boolean removeBookFromOrder(Order order, Book book);

        public double countPrice(Order order);

        public Order createOrderCopy(Order order) throws CloneNotSupportedException;

        public boolean executeOrderById(Integer id);

}
